<?php

	namespace Home\Controller;
	use Think\Controller;

	/**
	 * 
	 */
	 class OrderController extends Controller
	 {
	 	
	 	public function order()
	 	{	
	 		
	 		$uid = 2;
	 		$order = M('order');
	 		$orderde1 = $order
	 					->join('user on order.uid = user.user_id')
	 					->join('sku_goods on order.goods_id = sku_goods.sku_id')
	 					->join('product on sku_goods.proudct_id = product.id')
	 					->where("order.uid = {$uid} && user.user_id = {$uid}")->find();

	 		NSLog($orderde);
	 		$this->assign('list',$orderde);

	 		// NSLog($orderde1);
	 		$this->assign('list',$orderde1);
	 		$this->display();
	 	}

	 	public function orderdetail()
	 	{
	 		$uid = 2;
	 		$order = M('order');
	 		$orderdetail = $order
	 					 ->where("order.uid = {$uid}")->select();	
	 		// NSLog($orderdetail);

	 		$this->display();
	 	}


	 // M('t1')->join('t2 on t1.id = t2.uid')->where("t1.id = {$uid}")->order()->limit()->select()/find();

}

